#include <stdio.h>
#include "csi_math.h"
#include "csi_const_structs.h"

#define TEST_SIZE 1024

static q15_t src[TEST_SIZE] = {
    0x4000, 0x44d9, 0x43e0, 0x3dc9, 0x33bb, 0x2735, 0x19e9, 0x0d90,
    0x03be, 0xfdbe, 0xfc6f, 0x002d, 0x08cc, 0x1596, 0x255f, 0x36a1,
    0x479d, 0x568c, 0x61c2, 0x67de, 0x67e9, 0x616d, 0x5488, 0x41e2,
    0x2aa8, 0x106c, 0xf506, 0xda68, 0xc271, 0xaec5, 0xa0a7, 0x98dc,
    0x979e, 0x9c93, 0xa6de, 0xb52e, 0xc5e5, 0xd73e, 0xe774, 0xf4f2,
    0xfe79, 0x033a, 0x02ea, 0xfdcc, 0xf4a7, 0xe8b0, 0xdb72, 0xcea1,
    0xc3f4, 0xbcf7, 0xbae6, 0xbe8d, 0xc831, 0xd789, 0xebc2, 0x038f,
    0x1d49, 0x370f, 0x4ef7, 0x6337, 0x724c, 0x7b21, 0x7d24, 0x7854,
    0x6d41, 0x5cfe, 0x4906, 0x3319, 0x1d14, 0x08c4, 0xf7bc, 0xeb31,
    0xe3dd, 0xe1f4, 0xe519, 0xec73, 0xf6b9, 0x025b, 0x0da4, 0x16ec,
    0x1cb9, 0x1dec, 0x19db, 0x1063, 0x01ef, 0xef6c, 0xda38, 0xc404,
    0xaea7, 0x9bf7, 0x8d9f, 0x84f4, 0x82d5, 0x879b, 0x9309, 0xa457,
    0xba41, 0xd322, 0xed1f, 0x064a, 0x1cd8, 0x2f3f, 0x3c61, 0x43a0,
    0x44ee, 0x40c6, 0x3823, 0x2c68, 0x1f36, 0x1248, 0x0746, 0xff9e,
    0xfc5c, 0xfe12, 0x04cc, 0x1009, 0x1eca, 0x2fa8, 0x40f8, 0x50ee,
    0x5dd1, 0x661c, 0x68a9, 0x64cf, 0x5a6e, 0x49f8, 0x3467, 0x1b2a,
    0x0000, 0xe4d6, 0xcb99, 0xb608, 0xa592, 0x9b31, 0x9757, 0x99e4,
    0xa22f, 0xaf12, 0xbf08, 0xd058, 0xe136, 0xeff7, 0xfb34, 0x01ee,
    0x03a4, 0x0062, 0xf8ba, 0xedb8, 0xe0ca, 0xd398, 0xc7dd, 0xbf3a,
    0xbb12, 0xbc60, 0xc39f, 0xd0c1, 0xe328, 0xf9b6, 0x12e1, 0x2cde,
    0x45bf, 0x5ba9, 0x6cf7, 0x7865, 0x7d2b, 0x7b0c, 0x7261, 0x6409,
    0x5159, 0x3bfc, 0x25c8, 0x1094, 0xfe11, 0xef9d, 0xe625, 0xe214,
    0xe347, 0xe914, 0xf25c, 0xfda5, 0x0947, 0x138d, 0x1ae7, 0x1e0c,
    0x1c23, 0x14cf, 0x0844, 0xf73c, 0xe2ec, 0xcce7, 0xb6fa, 0xa302,
    0x92bf, 0x87ac, 0x82dc, 0x84df, 0x8db4, 0x9cc9, 0xb109, 0xc8f1,
    0xe2b7, 0xfc71, 0x143e, 0x2877, 0x37cf, 0x4173, 0x451a, 0x4309,
    0x3c0c, 0x315f, 0x248e, 0x1750, 0x0b59, 0x0234, 0xfd16, 0xfcc6,
    0x0187, 0x0b0e, 0x188c, 0x28c2, 0x3a1b, 0x4ad2, 0x5922, 0x636d,
    0x6862, 0x6724, 0x5f59, 0x513b, 0x3d8f, 0x2598, 0x0afa, 0xef94,
    0xd558, 0xbe1e, 0xab78, 0x9e93, 0x9817, 0x9822, 0x9e3e, 0xa974,
    0xb863, 0xc95f, 0xdaa1, 0xea6a, 0xf734, 0xffd3, 0x0391, 0x0242,
    0xfc42, 0xf270, 0xe617, 0xd8cb, 0xcc45, 0xc237, 0xbc20, 0xbb27,
    0xc000, 0xcad3, 0xdb3a, 0xf048, 0x089c, 0x227f, 0x3c0d, 0x535d,
    0x66b0, 0x7497, 0x7c16, 0x7cb7, 0x7696, 0x6a60, 0x593e, 0x44bc,
    0x2ea4, 0x18d3, 0x050e, 0xf4d6, 0xe94b, 0xe30d, 0xe232, 0xe645,
    0xee51, 0xf8fe, 0x04b2, 0x0fb6, 0x1867, 0x1d5c, 0x1d8b, 0x1864,
    0x0de0, 0xfe84, 0xeb58, 0xd5cd, 0xbf9e, 0xaaa5, 0x98b4, 0x8b66,
    0x83fc, 0x833c, 0x8960, 0x960f, 0xa867, 0xbf0d, 0xd84e, 0xf248,
    0x0b11, 0x20e6, 0x3252, 0x3e4f, 0x445b, 0x4482, 0x3f5d, 0x35fe,
    0x29d4, 0x1c8c, 0x0fe0, 0x0570, 0xfe96, 0xfc4b, 0xff06, 0x06b6,
    0x12bf, 0x220b, 0x3324, 0x4453, 0x53ce, 0x5fe2, 0x671b, 0x686a,
    0x6340, 0x5799, 0x4606, 0x2f99, 0x15d3, 0xfa81, 0xdf93, 0xc6f0,
    0xb24b, 0xa2fd, 0x99e5, 0x975a, 0x9b1f, 0xa470, 0xb212, 0xc272,
    0xd3cf, 0xe461, 0xf288, 0xfcef, 0x02ae, 0x0361, 0xff2d, 0xf6c0,
    0xeb3d, 0xde1e, 0xd113, 0xc5d7, 0xbe00, 0xbadf, 0xbd57, 0xc5ca,
    0xd40b, 0xe761, 0xfe97, 0x1813, 0x31fe, 0x4a6c, 0x5f89, 0x6fc1,
    0x79e6, 0x7d4b, 0x79d1, 0x6fed, 0x6098, 0x4d3c, 0x378d, 0x2167,
    0x0c9d, 0xfad1, 0xed4c, 0xe4e5, 0xe1e9, 0xe41a, 0xeab3, 0xf482,
    0x0000, 0x0b7e, 0x154d, 0x1be6, 0x1e17, 0x1b1b, 0x12b4, 0x052f,
    0xf363, 0xde99, 0xc873, 0xb2c4, 0x9f68, 0x9013, 0x862f, 0x82b5,
    0x861a, 0x903f, 0xa077, 0xb594, 0xce02, 0xe7ed, 0x0169, 0x189f,
    0x2bf5, 0x3a36, 0x42a9, 0x4521, 0x4200, 0x3a29, 0x2eed, 0x21e2,
    0x14c3, 0x0940, 0x00d3, 0xfc9f, 0xfd52, 0x0311, 0x0d78, 0x1b9f,
    0x2c31, 0x3d8e, 0x4dee, 0x5b90, 0x64e1, 0x68a6, 0x661b, 0x5d03,
    0x4db5, 0x3910, 0x206d, 0x057f, 0xea2d, 0xd067, 0xb9fa, 0xa867,
    0x9cc0, 0x9796, 0x98e5, 0xa01e, 0xac32, 0xbbad, 0xccdc, 0xddf5,
    0xed41, 0xf94a, 0x00fa, 0x03b5, 0x016a, 0xfa90, 0xf020, 0xe374,
    0xd62c, 0xca02, 0xc0a3, 0xbb7e, 0xbba5, 0xc1b1, 0xcdae, 0xdf1a,
    0xf4ef, 0x0db8, 0x27b2, 0x40f3, 0x5799, 0x69f1, 0x76a0, 0x7cc4,
    0x7c04, 0x749a, 0x674c, 0x555b, 0x4062, 0x2a33, 0x14a8, 0x017c,
    0xf220, 0xe79c, 0xe275, 0xe2a4, 0xe799, 0xf04a, 0xfb4e, 0x0702,
    0x11af, 0x19bb, 0x1dce, 0x1cf3, 0x16b5, 0x0b2a, 0xfaf2, 0xe72d,
    0xd15c, 0xbb44, 0xa6c2, 0x95a0, 0x896a, 0x8349, 0x83ea, 0x8b69,
    0x9950, 0xaca3, 0xc3f3, 0xdd81, 0xf764, 0x0fb8, 0x24c6, 0x352d,
    0x4000, 0x44d9, 0x43e0, 0x3dc9, 0x33bb, 0x2735, 0x19e9, 0x0d90,
    0x03be, 0xfdbe, 0xfc6f, 0x002d, 0x08cc, 0x1596, 0x255f, 0x36a1,
    0x479d, 0x568c, 0x61c2, 0x67de, 0x67e9, 0x616d, 0x5488, 0x41e2,
    0x2aa8, 0x106c, 0xf506, 0xda68, 0xc271, 0xaec5, 0xa0a7, 0x98dc,
    0x979e, 0x9c93, 0xa6de, 0xb52e, 0xc5e5, 0xd73e, 0xe774, 0xf4f2,
    0xfe79, 0x033a, 0x02ea, 0xfdcc, 0xf4a7, 0xe8b0, 0xdb72, 0xcea1,
    0xc3f4, 0xbcf7, 0xbae6, 0xbe8d, 0xc831, 0xd789, 0xebc2, 0x038f,
    0x1d49, 0x370f, 0x4ef7, 0x6337, 0x724c, 0x7b21, 0x7d24, 0x7854,
    0x6d41, 0x5cfe, 0x4906, 0x3319, 0x1d14, 0x08c4, 0xf7bc, 0xeb31,
    0xe3dd, 0xe1f4, 0xe519, 0xec73, 0xf6b9, 0x025b, 0x0da4, 0x16ec,
    0x1cb9, 0x1dec, 0x19db, 0x1063, 0x01ef, 0xef6c, 0xda38, 0xc404,
    0xaea7, 0x9bf7, 0x8d9f, 0x84f4, 0x82d5, 0x879b, 0x9309, 0xa457,
    0xba41, 0xd322, 0xed1f, 0x064a, 0x1cd8, 0x2f3f, 0x3c61, 0x43a0,
    0x44ee, 0x40c6, 0x3823, 0x2c68, 0x1f36, 0x1248, 0x0746, 0xff9e,
    0xfc5c, 0xfe12, 0x04cc, 0x1009, 0x1eca, 0x2fa8, 0x40f8, 0x50ee,
    0x5dd1, 0x661c, 0x68a9, 0x64cf, 0x5a6e, 0x49f8, 0x3467, 0x1b2a,
    0x0000, 0xe4d6, 0xcb99, 0xb608, 0xa592, 0x9b31, 0x9757, 0x99e4,
    0xa22f, 0xaf12, 0xbf08, 0xd058, 0xe136, 0xeff7, 0xfb34, 0x01ee,
    0x03a4, 0x0062, 0xf8ba, 0xedb8, 0xe0ca, 0xd398, 0xc7dd, 0xbf3a,
    0xbb12, 0xbc60, 0xc39f, 0xd0c1, 0xe328, 0xf9b6, 0x12e1, 0x2cde,
    0x45bf, 0x5ba9, 0x6cf7, 0x7865, 0x7d2b, 0x7b0c, 0x7261, 0x6409,
    0x5159, 0x3bfc, 0x25c8, 0x1094, 0xfe11, 0xef9d, 0xe625, 0xe214,
    0xe347, 0xe914, 0xf25c, 0xfda5, 0x0947, 0x138d, 0x1ae7, 0x1e0c,
    0x1c23, 0x14cf, 0x0844, 0xf73c, 0xe2ec, 0xcce7, 0xb6fa, 0xa302,
    0x92bf, 0x87ac, 0x82dc, 0x84df, 0x8db4, 0x9cc9, 0xb109, 0xc8f1,
    0xe2b7, 0xfc71, 0x143e, 0x2877, 0x37cf, 0x4173, 0x451a, 0x4309,
    0x3c0c, 0x315f, 0x248e, 0x1750, 0x0b59, 0x0234, 0xfd16, 0xfcc6,
    0x0187, 0x0b0e, 0x188c, 0x28c2, 0x3a1b, 0x4ad2, 0x5922, 0x636d,
    0x6862, 0x6724, 0x5f59, 0x513b, 0x3d8f, 0x2598, 0x0afa, 0xef94,
    0xd558, 0xbe1e, 0xab78, 0x9e93, 0x9817, 0x9822, 0x9e3e, 0xa974,
    0xb863, 0xc95f, 0xdaa1, 0xea6a, 0xf734, 0xffd3, 0x0391, 0x0242,
    0xfc42, 0xf270, 0xe617, 0xd8cb, 0xcc45, 0xc237, 0xbc20, 0xbb27,
    0xc000, 0xcad3, 0xdb3a, 0xf048, 0x089c, 0x227f, 0x3c0d, 0x535d,
    0x66b0, 0x7497, 0x7c16, 0x7cb7, 0x7696, 0x6a60, 0x593e, 0x44bc,
    0x2ea4, 0x18d3, 0x050e, 0xf4d6, 0xe94b, 0xe30d, 0xe232, 0xe645,
    0xee51, 0xf8fe, 0x04b2, 0x0fb6, 0x1867, 0x1d5c, 0x1d8b, 0x1864,
    0x0de0, 0xfe84, 0xeb58, 0xd5cd, 0xbf9e, 0xaaa5, 0x98b4, 0x8b66,
    0x83fc, 0x833c, 0x8960, 0x960f, 0xa867, 0xbf0d, 0xd84e, 0xf248,
    0x0b11, 0x20e6, 0x3252, 0x3e4f, 0x445b, 0x4482, 0x3f5d, 0x35fe,
    0x29d4, 0x1c8c, 0x0fe0, 0x0570, 0xfe96, 0xfc4b, 0xff06, 0x06b6,
    0x12bf, 0x220b, 0x3324, 0x4453, 0x53ce, 0x5fe2, 0x671b, 0x686a,
    0x6340, 0x5799, 0x4606, 0x2f99, 0x15d3, 0xfa81, 0xdf93, 0xc6f0,
    0xb24b, 0xa2fd, 0x99e5, 0x975a, 0x9b1f, 0xa470, 0xb212, 0xc272,
    0xd3cf, 0xe461, 0xf288, 0xfcef, 0x02ae, 0x0361, 0xff2d, 0xf6c0,
    0xeb3d, 0xde1e, 0xd113, 0xc5d7, 0xbe00, 0xbadf, 0xbd57, 0xc5ca,
    0xd40b, 0xe761, 0xfe97, 0x1813, 0x31fe, 0x4a6c, 0x5f89, 0x6fc1,
    0x79e6, 0x7d4b, 0x79d1, 0x6fed, 0x6098, 0x4d3c, 0x378d, 0x2167,
    0x0c9d, 0xfad1, 0xed4c, 0xe4e5, 0xe1e9, 0xe41a, 0xeab3, 0xf482,
    0x0000, 0x0b7e, 0x154d, 0x1be6, 0x1e17, 0x1b1b, 0x12b4, 0x052f,
    0xf363, 0xde99, 0xc873, 0xb2c4, 0x9f68, 0x9013, 0x862f, 0x82b5,
    0x861a, 0x903f, 0xa077, 0xb594, 0xce02, 0xe7ed, 0x0169, 0x189f,
    0x2bf5, 0x3a36, 0x42a9, 0x4521, 0x4200, 0x3a29, 0x2eed, 0x21e2,
    0x14c3, 0x0940, 0x00d3, 0xfc9f, 0xfd52, 0x0311, 0x0d78, 0x1b9f,
    0x2c31, 0x3d8e, 0x4dee, 0x5b90, 0x64e1, 0x68a6, 0x661b, 0x5d03,
    0x4db5, 0x3910, 0x206d, 0x057f, 0xea2d, 0xd067, 0xb9fa, 0xa867,
    0x9cc0, 0x9796, 0x98e5, 0xa01e, 0xac32, 0xbbad, 0xccdc, 0xddf5,
    0xed41, 0xf94a, 0x00fa, 0x03b5, 0x016a, 0xfa90, 0xf020, 0xe374,
    0xd62c, 0xca02, 0xc0a3, 0xbb7e, 0xbba5, 0xc1b1, 0xcdae, 0xdf1a,
    0xf4ef, 0x0db8, 0x27b2, 0x40f3, 0x5799, 0x69f1, 0x76a0, 0x7cc4,
    0x7c04, 0x749a, 0x674c, 0x555b, 0x4062, 0x2a33, 0x14a8, 0x017c,
    0xf220, 0xe79c, 0xe275, 0xe2a4, 0xe799, 0xf04a, 0xfb4e, 0x0702,
    0x11af, 0x19bb, 0x1dce, 0x1cf3, 0x16b5, 0x0b2a, 0xfaf2, 0xe72d,
    0xd15c, 0xbb44, 0xa6c2, 0x95a0, 0x896a, 0x8349, 0x83ea, 0x8b69,
    0x9950, 0xaca3, 0xc3f3, 0xdd81, 0xf764, 0x0fb8, 0x24c6, 0x352d
};

static q15_t ref_result[TEST_SIZE + 2] = {
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0xe000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x2000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000
};

int main(void)
{
    int i;
    int err;
    q15_t result[TEST_SIZE + 2];

    csi_rfft_q15(&csi_rfft_sR_q15_len1024, src, result);

    for (i = 0; i < TEST_SIZE + 2; i++) {
        err = abs(result[i] - ref_result[i]);
        if (err > 0xf) {
            printf("Example run failed!\r\n");
            while (1)
                ;
        }
    }

    printf("Example run successfully!\r\n");

    return 0;
}
